# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         demo10.01
# Description:
# Author:       $赵怡蕾
# Date:         2019/3/5
#-------------------------------------------------------------------------------

class Person:
    # Person类的构造方法
    def __init__(self,name = "Bill"):
        print("构造方法已经被调用")
        self.name = name
    def getName(self):
        return self.name
    def setName(self,name):
        self.name = name

person = Person()                  # 创建Person类的实例，在这里Person类的构造方法会调用
print(person.getName())
person1 = Person(name = "Mike")    # 创建Person类的实例，并指定name参数值，构造方法会调用
print(person1.getName())
person1.setName(name = "John")
print(person1.getName())